package cn.zengchen233.controller;

import cn.zengchen233.mapper.UserMapper;
import cn.zengchen233.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zengchen
 * @title UserController
 * @description
 * @create 2023/2/20
 */
@RestController
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @PutMapping("/add")
    public void addUser(@RequestBody User user) {
        userMapper.insert(user);
    }
}
